# gil global interpreter lock (cpython)
import threading

total=0

def add():
    global total
    for i in range(10000000):
        total += i
def des():
    global total
    for i in range(10000000):
        total -= i


if __name__ == '__main__':
    a=threading.Thread(target=add)
    b=threading.Thread(target=des)
    a.start()
    b.start()

    a.join()
    b.join()

    print(total)